import Taro from '@tarojs/taro'
import {View} from '@tarojs/components'
import {AtTabBar} from 'taro-ui'

export default class Index extends Taro.Component {
  constructor() {
    super(...arguments)
    this.state = {
      current: 0
    }
  }

  handleClick(value) {
    this.setState({
      current: value
    })
  }

  render() {
    return (
      <View>

        <AtTabBar
        fixed
        tabList={[
        {title: '主页', iconType: 'iconfont spk-shouye'},
        {title: '发现', iconType: 'iconfont spk-faxian'},
        {title: '我的', iconType: 'iconfont spk-wode'}
        ]}
        onClick={this.handleClick.bind(this)}
        current={this.state.current}
        />

      </View>

    )
  }
}
